package demo4;

public class Duck extends Animals implements IsRun,IsSwim,IsFly{
    public Duck(String name, int age){
    super(name,age);
    }

    public void eat(){
        System.out.println(name + "吃鸭粮");
    }

    public void run(){
        System.out.println(name + "在跑");
    }
    public void swim(){
        System.out.println(name + "在游泳");
    }
    public void fly(){
        System.out.println(name + "在飞");
    }
}
